import json
import requests
from test_case import conftest

class get_cost_info:

    def get_cost_info(self):
        try:
            url = 'http://erp.uat1.rscloud.com/api-zendai/finance/e/cost-item/query'
            data = {
                'rentModel': 'fixed_rent'
                    }
            result = requests.post(url=url, headers=conftest.fin_header, data=json.dumps(data))
            print(result.text)
            return json.loads(result.text)['data'][1]
        except BaseException:
            return False